package com.suyang.syt.util;

import java.util.Date;

import javax.servlet.http.HttpServletResponse;


public class ExcelUtil {

	private ExcelUtil() {

	}

	public static void setHeader(String fileName, HttpServletResponse response) {
		response.reset();
		response.setContentType("octets/stream");
		String timestamp = DateFormat.dateToString(new Date(), "yyyyMMddHHmmss");
		response.addHeader("Content-Disposition", "attachment;filename=" + fileName + "_" + timestamp + ".xls");
	}
}
